class Logo{
    constructor(ops){
        this.url=ops.url;
        this.cont=ops.cont;
        this.load()
    }
    load(){
        request({
            url:this.url,
            success:(res)=>{
                this.res=JSON.parse(res)
                this.render()
            }
        })
    }
    render(){
        let str="";
        for(var i=0;i<this.res.length;i++){
            str+=` 
            <li class="pinli" index="${this.res[i].Id}">
                <img src="${this.res[i].url}" alt="">
                <a href="#" class="cover">${this.res[i].name}</a>
            </li>
        `
        }
        this.cont.innerHTML=str;
   
        
    }
}
new Logo({
    cont:document.querySelector(".pinallul"),
    url:"./data/data.json"
})


